--This Test Should have 2 children for both pass and fail task
DECLARE

	v_SweepProp_Seq1 INTEGER;
	v_SweepProp_Seq2 INTEGER;
	v_SweepProp_Seq3 INTEGER;
	v_SweepProp_Seq4 INTEGER;
	v_RequestDefnId  INTEGER;
	v_SweepFI_Seq1 INTEGER;
	v_SweepFI_Seq2 INTEGER;
	v_SweepFI_Seq3 INTEGER;
BEGIN
	INSERT INTO AUTOSC.CFG_REQUEST_TYPE (REQUEST_TYPE_ID, REQUEST_TYPE_NAME, IS_REQUESTABLE) VALUES(CFG_REQUEST_TYPE_SEQ.nextVal, 'LOAD_TEST_SWEEP_01', 'Y');
	
	INSERT INTO AUTOSC.CFG_TASK_TYPE ( TASK_TYPE_ID, TASK_TYPE_NAME, TASK_CATEGORY_ID, MAX_RETRY_COUNT, CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES ( CFG_TASK_TYPE_SEQ.nextVal, 'LOAD_TEST_01_TASK_TYPE_07_A', (SELECT TASK_CATEGORY_ID FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE TASK_CATEGORY='SWEEP'), 2, 'D', 'T', 5, 1440 );
	INSERT INTO AUTOSC.CFG_TASK_TYPE ( TASK_TYPE_ID, TASK_TYPE_NAME, TASK_CATEGORY_ID, MAX_RETRY_COUNT, CODE_GROUP, EXT_AUTOSC, PRIORITY, RUNTIME_LENGTH) VALUES ( CFG_TASK_TYPE_SEQ.nextVal, 'LOAD_TEST_01_TASK_TYPE_07_B', (SELECT TASK_CATEGORY_ID FROM AUTOSC.CFG_TASK_CATEGORY_INFO WHERE TASK_CATEGORY='NOTIFY'), 2, 'D', 'T', 5, 1440 );
	
	
	SELECT CFG_REQUEST_DEFN_SEQ.nextVal INTO v_RequestDefnId FROM DUAL;
	INSERT INTO AUTOSC.CFG_REQUEST_DEFN (REQUEST_DEFN_ID, REQUEST_TYPE_ID, MODALITY, MODEL_TYPE, REQUEST_DESC, INITIAL_TASK_ID, REQUESTER, VERIFIER, EXPIRES_ON) VALUES(v_RequestDefnId, (SELECT REQUEST_TYPE_ID FROM AUTOSC.CFG_REQUEST_TYPE WHERE REQUEST_TYPE_NAME='LOAD_TEST_SWEEP_01'), 'MR', '_LX-IIP3', 'LOAD_TEST_01_TYPE_DEFN_07', (SELECT TASK_TYPE_ID FROM AUTOSC.CFG_TASK_TYPE WHERE TASK_TYPE_NAME='LOAD_TEST_01_TASK_TYPE_07_A'), 'navdeep.mahajan@ge.com', 'navdeep.mahajan@ge.com', (SYSDATE+365));
	
	INSERT INTO AUTOSC.CFG_TASK_CLASS_MAP (task_class_map_id, task_type_name, task_class) VALUES (CFG_TASK_CLASS_MAP_ID_SEQ.nextVal, 'LOAD_TEST_01_TASK_TYPE_07_A', 'dummyTask');
	INSERT INTO AUTOSC.CFG_TASK_CLASS_MAP (task_class_map_id, task_type_name, task_class) VALUES (CFG_TASK_CLASS_MAP_ID_SEQ.nextVal, 'LOAD_TEST_01_TASK_TYPE_07_B', 'notifyTask');
	
	
	INSERT INTO AUTOSC.CFG_TASK_RELATIONSHIP ( RELATION_ID, PARENT_ID, CHILD_ID) VALUES ( AUTOSC.CFG_TASK_RELATIONSHIP_SEQ.nextVal,(SELECT TASK_TYPE_ID FROM AUTOSC.CFG_TASK_TYPE WHERE TASK_TYPE_NAME='LOAD_TEST_01_TASK_TYPE_07_A') , (SELECT TASK_TYPE_ID FROM AUTOSC.CFG_TASK_TYPE WHERE TASK_TYPE_NAME='LOAD_TEST_01_TASK_TYPE_07_B'));
	
	Commit;
END;
/